Fix master/slave handling in xenconsoled and qemu
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Dec 2007 14:45:45 +0000 (14:45 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 19 Dec 2007 14:45:45 +0000 (14:45 +0000)
commit25d73306ec0dc823fffcf4947e56e20159e6ead0
treebc5e8f0533baeb20efc2a76a45e844ea9f45d6bd
parent2578655c6420d312bd465be58611de246d78dc7e
Fix master/slave handling in xenconsoled and qemu

Fix a number of problems with the pty handling:

- make openpty() implementation work on Solaris
- set raw on the slave fd, not the master, as the master doesn't
  have a line discipline pushed on Solaris
- make sure we don't leak the slave fd returned from openpty()
- don't use the 'name' argument of openpty() as it's a security risk
- note behaviour of a zero read of the master on Solaris
- remove pointless tcget/setattr

Signed-off-by: John Levon <john.levon@sun.com>
Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
tools/console/daemon/io.c
tools/ioemu/vl.c